#include <my_head.h>

int main(int argc, const char *argv[]){
    if(2 != argc){
        printf("Usage : %s pathname\n", argv[0]);
        return -1;
    }
    FILE *fp = NULL;
    if(NULL == (fp = fopen(argv[1], "r")))
        ERR_LOG("fopen error");
    int hang = 0;
    int value = 0;
    while(EOF != (value = fgetc(fp))){
        if('\n' == value){
            hang++;
        }
    }
    printf("%d\n", hang);
    fclose(fp);
    return 0
}